package com.itheima.controller;


import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
@RequestMapping("/user")//一级请求路径
public class UserController {

    @RequestMapping(value = "findAll", method = RequestMethod.GET/*,params = {"name=admin"}*/)//二级请求路径
    public String findAll() {
        System.out.println("findALl");

        //return "redirect:/success.jsp";//返回视图结果
        //return "forward:/success.jsp";//返回视图结果(1、物理视图，2、逻辑视图)
        return "success";
    }
    @RequestMapping("/update")
    public String update(){
        System.out.println("update");
        return "success";
    }
}
